/**
 * related to main.ui
 * 
 * @Author : 15637190754
 * @Timestamp : 2017-12-26
 */
var page = sm('do_Page');
var app = sm("do_App");
var do_External = sm("do_External");



var nf = sm("do_Notification");
var do_Button_exit = ui("do_Button_exit");
var do_Button_password = ui("do_Button_password");
var do_Button_help = ui("do_Button_help");
var do_Button_about = ui("do_Button_abou");
var do_Button_tel = ui("do_Button_tel");
var do_Label_telnumber = ui("do_Label_telnumber");

//获取token
var cacher = sm("do_DataCache");
var token  = cacher.loadData("token");

do_Button_password.on("touch", function() {
	app.openPage("source://view/changePassword/ChangePassword.ui");
});

do_Button_help.on("touch", function() {
	app.openPage("source://view/Help/Help.ui");
});
do_Button_about.on("touch", function() {
	app.openPage("source://view/AboutMarketingCloud/AboutMarketingCloud.ui");
});
do_Button_tel.on("touch", function() {
	//打开电话页面，并将电话号码传过去
	do_External.openDial(do_Label_telnumber.get("text"));
});


page.on('back',function(){
	app.closePage();
})

/*****返回按钮*****/
do_Button_exit.on("touch",function(){
	cacher.removeData('token');
	app.closePage();
	app.openPage("source://view/logReg/login.ui")
})
